package com.book.chapter.common.utils;

import com.book.book.NovelSiteEnum;
import com.book.chapter.service.ChapterDetailSpider;
import com.book.chapter.service.DefaultChapterDetailSpider;

/***
 * @Author Lin
 * @Date Create By 14:59 2017/10/6
 * @Description
 */
public class ChapterDetailSpiderFactory {
    private ChapterDetailSpiderFactory() {
    }

    public static ChapterDetailSpider getChapterDetailSpider(String url) {

        ChapterDetailSpider detailSpider = null;
        NovelSiteEnum novelSiteEnum = NovelSiteEnum.getEnumByUrl(url);
        switch (novelSiteEnum) {
            case KanShuZhong:
            case DingDianXiaoShuo:
            case ShenShuWang:
            case BiXiaWenXue:
            case BiQuGe:
            case BiXiaWenXue9:
                detailSpider = new DefaultChapterDetailSpider();
        }

        return detailSpider;
    }
}
